1. Technical Field
The present invention relates to network interfacing and more particularly, to methods and systems for accessing data transmitted over a network and stored in a buffer memory.
2. Background Art
Network interface devices handle packets of data for transmission between a host computer and a network communications system, such as a local area network. The host computer may be implemented as a client station, a server, or a switched hub. One primary function of the network interface device is to buffer data to compensate for timing discrepancies between the clock domain of the host computer and the clock domain of the network.
Network interface devices typically include a first in, first out (FIFO) buffer memory for storing transmit and receive data, where the transmit data is stored in a transmit FIFO prior to transmission on the network media by a Media Access Controller (MAC), and receive data is stored in a receive FIFO by the MAC prior to transfer to the host computer via a host computer bus interface.
One disadvantage with the use of a FIFO for a transmit buffer or a receive buffer of a network interface device is the high latency encountered during the buffering process. The latency of the network interface device is the time delay between the time that a data frame is supplied to the network interface device and the time the data is transmitted on the network media, or vice versa.
An additional disadvantage with the use of a FIFO for a transmit or receive buffer is the lack of flexibility in manipulating data. For example, a data frame received in a receive FIFO must be read out in the order received, by definition. In computer networks where a plurality of network stations are transmitting data, a user may receive a large amount of data in a short amount of time. Accordingly, a receive FIFO that reads each bit of each data frame in the order received further increases the latency in processing the actual incoming data.
There is a need for an arrangement that enables the use of a random access memory in a network interface device, as opposed to a FIFO buffer, to store a data frame and to provide flexibility in reading the data frame.
There is also a need for a method of reading data stored in a random access memory of a network interface device in a flexible and efficient manner.
These and other needs are met by the present invention, where a network interface device includes a random access memory for storing data frames, a read controller for accessing the data and a programmable register for storing read pointer information.
According to one aspect of the invention, a network interface device is provided for buffering data. The network interface device includes a random access memory and a read offset register configured to store read pointer information. The network interface device also includes a read controller configured to read data stored in the random access memory based on the read pointer information.
Another aspect of the present invention provides a method for reading data stored in a network interface device. The method includes receiving data frames and storing the data frames into a random access memory. The method also includes reading the contents of a read offset register. The method further includes reading data stored in the random access memory based on the contents of the read offset register.
Additional advantages and features of the present invention will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following or may be learned by practice of the invention. The advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.